# ================= 导入filter组件 =================
from django_filters import FilterSet
from django_filters import filters
# ================= 导入数据类 =====================
from useweb.models import Staff


class StaffFilter(FilterSet):
    areaplace = filters.CharFilter(field_name="areaplace")
    area = filters.CharFilter(field_name="areaplace__brancharea")
    branch = filters.CharFilter(field_name="areaplace__brancharea__branch")

    class Meta:
        model=Staff
        fields = ('id','areaplace', 'area', 'branch', 'status')